package routers

import (
	"api_server/internal/controllers"
	"api_server/internal/middleware"

	"github.com/gin-gonic/gin"
)

func RegisteWx(engine *gin.Engine) {
	openApi := engine.Group("open")

	wx := new(controllers.WxController)
	openApi.POST("/wx/code/auth", wx.DoAuthCode)

	authApi := engine.Group("auth").Use(middleware.VerifyToken())
	authApi.POST("/update/user", wx.UpdateInfo)
	authApi.POST("/update/phone", wx.UpdatePhone)
}
